{% extends "layout/admin.html" %}

{% block title %}添加{{category.name}}属性{% endblock %}

{% block content %}
<div class="mb10 fl"><a class="but" href="/admin/categoryattrs/{{category.id}}">返回 {{category.name}} 管理</a></div>
<hr>
<h1>修改 {{category.name}} 的属性</h1>
{%set messages=handler.get_flashed_messages() %}
{%if messages%}
    <div class="msg">
        {% for type, msg in messages%}
            <span>{{msg}}</span>
        {% endfor %}
    </div>
{%endif%}

<form action="" method="post">
	{{xsrf()}}
    <div class="form-group">
    <label>属性名</label>
    <input type="text" class="input"  name="name" maxlength="20" value="{{categoryattr.name}}" placeholder="最多20位">
    </div>
    <div class="form-group">
    <label>默认</label>
    <input type="text" class="input"  name="dec" value="{{categoryattr.dec}}" placeholder="最多100字">
    </div>
    <div class="form-group">
    <label>排序</label>
    <input type="text" class="input"  name="order" maxlength=3 size=3  value="{{categoryattr.order}}" data-var="数字，最多3位">
    </div>
    <div class="form-group">
    <input type="submit" name="sub" value="提交" class="sub">
    </div>
</form>

{% endblock %}